package com.kuang.controller;

import com.kuang.service.CourseService;
import com.kuang.pojo.Courses;
import com.kuang.service.CourseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import sun.lwawt.macosx.CPrinterDevice;

import java.util.List;

@Controller
@RequestMapping("/course")
public class CourseController {

    @Autowired
    @Qualifier("CourseServiceImpl")
    private CourseService courseService;

    @RequestMapping("/showStudentCourse")
    public String showStudentCourse(Model model, String STno)
    {
        List<Courses> list = courseService.queryCourseBySTno(STno);
        model.addAttribute("list", list);
        return "showStudentCourse";
    }

}
